﻿<html>
<head><title>数据库设计文档 -- ${dataBaseName}</title>
    <style type='text/css'>body, td {
        font-family: verdana;
        font-size: 12px;
        line-height: 150%;
    }

    table {
        width: 100%;
        background-color: #ccc;
        margin: 5px 0;
    }

    td {
        background-color: #fff;
        padding: 3px;
        padding-left: 10px;
    }

    thead td {
        text-align: center;
        font-weight: bold;
        background-color: #eee;
    }

    a:link, a:visited, a:active {
        color: #015FB6;
        text-decoration: none;
    }

    a:hover {
        color: #E33E06;
    }</style>
    <head>
<body style='text-align:center;'>
<div style='width:960px; margin:20px auto; text-align:left;'><a name='index'/>
    <H2 style='text-align:center; line-height:50px;'>数据库设计文档</H2>
    <div><b>数据库名：${dataBaseName}</b></div>
    <table cellspacing='1' cellpadding='0'>
        <thead>
        <tr>
            <td style='width:40px; '>序号</td>
            <td>表名</td>
            <td>说明</td>
        </tr>
        </thead>
        <#list tableList as table>
        <tr>
            <td style='text-align:center;'> ${table_index +1}</td>
            <td><a href='#${table.name}'>${table.name}</a></td>
            <td>${table.tableDescribe}</td>
        </tr>
        </#list>
    </table>

    <#list tableList as table>
    <a name='${table.name}'/>
    <div style='margin-top:30px;'><a href='#index' style='float:right; margin-top:6px;'>返回目录</a><b>表名：${table.name}</b>
    </div>
    <div>说明：${table.tableDescribe}</div>
    <div>数据列：</div>
    <table cellspacing='1' cellpadding='0'>
        <thead>
        <tr>
            <td style='width:40px; '>序号</td>
            <td>名称</td>
            <td>说明</td>
            <td>数据类型</td>
            <td>长度</td>
            <td>小数位</td>
            <td>允许空值</td>
            <td>主键</td>
            <td>默认值</td>
        </tr>
        </thead>
        <#list table.columns as column>

        <tr>
            <td style='width:40px; '>${column_index +1}</td>
            <td>${column.field!}</td>
            <td>${column.comment!}</td>
            <td>${column.type!}</td>
            <td>${column.fieldLength!}</td>
            <td>${column.decimalPlace!}</td>
            <td>${column.isNull!}</td>
            <td>${column.key!}</td>
            <td>${column.defaultValue!}</td>
        </tr>
        </#list>

    </table>
    </#list>

</div>
</body>
</html>